package com.easemob.chat;

import android.graphics.Bitmap;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class EMGroup extends EMContact
{
  protected String description;
  protected String owner;
  protected ArrayList<String> members;
  protected long lastModifiedTime;
  protected boolean isPublic;
  protected boolean allowInvites;
  protected boolean membersOnly;
  protected int maxUsers = 0;
  protected int affiliationsCount = -1;
  protected boolean isMsgBlocked = false;

  public EMGroup(String paramString)
  {
    this.username = paramString;
    this.eid = EMContactManager.getEidFromGroupId(paramString);
    this.lastModifiedTime = 0L;
    this.members = new ArrayList();
    this.description = "";
    this.isPublic = false;
    this.owner = "";
    this.allowInvites = false;
    this.membersOnly = false;
  }

  public String getDescription()
  {
    return this.description;
  }

  public void setDescription(String paramString)
  {
    this.description = paramString;
  }

  public String getOwner()
  {
    return this.owner;
  }

  public void setOwner(String paramString)
  {
    this.owner = paramString;
  }

  public synchronized void addMember(String paramString)
  {
    this.members.add(paramString);
  }

  public synchronized void removeMember(String paramString)
  {
    this.members.remove(paramString);
  }

  public synchronized List<String> getMembers()
  {
    return Collections.unmodifiableList(this.members);
  }

  public synchronized void setMembers(List<String> paramList)
  {
    this.members.addAll(paramList);
  }

  public String getGroupId()
  {
    return this.username;
  }

  public void setGroupId(String paramString)
  {
    this.username = paramString;
  }

  public String getGroupName()
  {
    return this.nick;
  }

  public void setGroupName(String paramString)
  {
    this.nick = paramString;
  }

  public boolean isPublic()
  {
    return this.isPublic;
  }

  public void setIsPublic(boolean paramBoolean)
  {
    this.isPublic = paramBoolean;
  }

  public boolean isAllowInvites()
  {
    return this.allowInvites;
  }

  public boolean isMembersOnly()
  {
    return this.membersOnly;
  }

  public int getMaxUsers()
  {
    return this.maxUsers;
  }

  public void setMaxUsers(int paramInt)
  {
    this.maxUsers = paramInt;
  }

  public int getAffiliationsCount()
  {
    return this.affiliationsCount;
  }

  public void setAffiliationsCount(int paramInt)
  {
    this.affiliationsCount = paramInt;
  }

  public boolean getMsgBlocked()
  {
    return this.isMsgBlocked;
  }

  public boolean isMsgBlocked()
  {
    return this.isMsgBlocked;
  }

  public void setMsgBlocked(boolean paramBoolean)
  {
    this.isMsgBlocked = paramBoolean;
  }

  public String toString()
  {
    return this.nick;
  }

  Bitmap getGroupAvator()
  {
    Exception localException = new Exception("group avator not supported yet");
    localException.printStackTrace();
    return null;
  }

  void copyGroup(EMGroup paramEMGroup)
  {
    this.eid = paramEMGroup.eid;
    this.description = paramEMGroup.description;
    this.isPublic = paramEMGroup.isPublic;
    this.allowInvites = paramEMGroup.allowInvites;
    this.membersOnly = paramEMGroup.membersOnly;
    this.lastModifiedTime = System.currentTimeMillis();
    this.members.clear();
    this.members.addAll(paramEMGroup.getMembers());
    this.nick = paramEMGroup.nick;
    this.owner = paramEMGroup.owner;
    this.username = paramEMGroup.username;
    this.maxUsers = paramEMGroup.maxUsers;
    this.affiliationsCount = paramEMGroup.affiliationsCount;
    this.isMsgBlocked = paramEMGroup.isMsgBlocked;
  }

  public long getLastModifiedTime()
  {
    return this.lastModifiedTime;
  }

  public void setLastModifiedTime(long paramLong)
  {
    this.lastModifiedTime = paramLong;
  }

  public void setPublic(boolean paramBoolean)
  {
    this.isPublic = paramBoolean;
  }
}

/* Location:           D:\hygieia\userclient\common\libs\easemobchat_2.1.8.jar
 * Qualified Name:     com.easemob.chat.EMGroup
 * JD-Core Version:    0.6.1
 */